package com.chen.invoicing;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import com.alipay.util.StringUtil;
import com.google.gson.Gson;

import entity.WoPayMaterialObjectOrderInfo;
import jifen.cmbc.invoicing.entity.ResVitualOrderListQueryDTO;
import util.ExcelUtils;

public class Test {
	
	public static String readFileByLines(String fileName) {
        File file = new File(fileName);
        BufferedReader reader = null;
        try {
            reader = new BufferedReader(new FileReader(file));
            String tempString = null;
            StringBuilder sb = new StringBuilder();
            int line = 1;
            // 一次读入一行，直到读入null为文件结束
            while ((tempString = reader.readLine()) != null) {
                // 显示行号
            	sb.append(tempString);
                line++;
            }
            reader.close();
            return sb.toString();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (IOException e1) {
                }
            }
        }
        return "";
    }
	
	public static String tt(String respCode){
		switch (respCode) {
			case "00":
				return "00";
			case "01":
			case "02":
			case "03":
				return "01";
			default:
				return "default";
		}
	}

	public static void main(String[] args) throws Exception {
		System.out.println(Test.tt("04"));
		
		
//		String filePath = "E:\\进货单id.xls";
//		List<List<String>> xls = ExcelUtils.readXls(filePath);
//        if(xls != null && !xls.isEmpty()){
//        	int totalCount = xls.size();
//        	xls.stream().forEach(xl -> {
//        		for(int i = 0;i<xl.size();i++){
//        			String delivId = xl.get(0);
//        			String OrderCode = xl.get(1);
//        			
//        		}
//        	});
//        }
	}

}
